<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <title>active-event-batchack</title>
    <%@ include file="../include/common.jsp"%>
    <%@ include file="../include/form.jsp"%>
    <script type="text/javascript">
    $(function(){
		 $.formValidator.initConfig({formid:"myform"
	          ,onerror:function(msg){}
	          ,onsuccess:function(){
	        	  		ack();
	          			return false;
	          }
	     });
	});
  function ack(){
	  if($("#remarks").val() == ''){
			getTopWin(window).getMessageBox().alert("备注内容不能为空","提示");
			return;
		}
	  //提交
	$.ajax({
		   type: "POST", 
		   url: "${pageContext.request.contextPath}/event/active-event!ack.action", //请求的action
		   data: $("#myform").serialize(), //传的参数
		   dataType: 'json',
		   success: function(data){ //结果
				var pWin = getTopWin(window).currentWin["ack-active-event"];
				if(data.flag == "false"){
					pWin.showMessage("包含已认领或清除事件");
				}	
		   		pWin.datagrid();
		   		pWin.cancelAllCheck();
				getTopWin(window).closejBox("ack-active-event");
		   }
	});
  }
  function closewin(){
	  getTopWin(window).closejBox("ack-active-event");
  }
  </script>
  </head>
  
  <body class="padding-8">
   <form action="" id="myform" name="myform" method="post">
    		<table class="table_eidt" style="border:0px;">
    			<tr>
	    			<td><label><img src="/bsm/style/default/bsm/images/pencil.png">我要备注</label></td>
    			</tr>
    			<tr>
	    			<td><textarea id="remarks" name="remarks" rows="5" style="width:576px; height:73px; overflow: hidden;"></textarea></td>
    			</tr>
    		</table>
    		<div align="center" style="padding-top: 9px;">
	    		<input type="submit" id="submit" name="button" value="保存" class="btn-4">
	    		<input type="button" value="取消" onclick="closewin();" class="btn-4">
    		</div>
    		<input type="hidden" id="id" name="id" value=${id}>
    	</form>
  </body>
</html>
